using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SO_DIAGNOSISMap : EntityTypeConfiguration<SO_DIAGNOSIS>
    {
        public SO_DIAGNOSISMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Code)
                .HasMaxLength(35);

            this.Property(t => t.Diagnosis)
                .HasMaxLength(200);

            this.Property(t => t.النشخيص)
                .HasMaxLength(200);

            this.Property(t => t.Type)
                .HasMaxLength(50);

            this.Property(t => t.Category)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("SO_DIAGNOSIS");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Code).HasColumnName("Code");
            this.Property(t => t.Diagnosis).HasColumnName("Diagnosis");
            this.Property(t => t.النشخيص).HasColumnName("النشخيص");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Category).HasColumnName("Category");
        }
    }
}
